import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Administrator
 * Date: 2024-03-03
 * Time: 20:30
 */

public class Test {

    public static int funAdd2(int num){
        int sum = 0;
        int num1 = 0;
        int num2 = 1;
        int num3 = -1;
        if(num == 1 && num == 2 ){
            System.out.println(num - 1);
        }else {
            for (int i = 3; i <= num; i++) {
                num3 = num1 + num2;
                num1 = num2;
                num2 = num3;
            }
        }
        return num3;
    }



    public static int funAdd(int num){
        if(num == 1 || num == 2){
            return num - 1;
        }else {
            return funAdd(num - 1) + funAdd(num - 2);
        }
    }
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int num = scan.nextInt();
        System.out.println(funAdd(num));
    }



    public static int func1(int num){
        if ( num < 10 ){
            return num;
        }else{
            return func1(num / 10 ) + num % 10;
        }
    }
    public static void main17(String[] args) {
        Scanner scan = new Scanner(System.in);
        int num = scan.nextInt();
        System.out.println(func1(num));
    }



    public static int funS(int num){
        int sum = 1;
        for (int i = 1; i <= num ; i++) {
            sum *= i;
        }
        return sum;
    }
    public static int funcN(int num){
        if(num == 1){
            return 1;
        }else {
            return funS(num) + funcN(num - 1);
        }
    }
    public static void main16(String[] args) {
        Scanner scan = new Scanner(System.in);
        int num = scan.nextInt();
        System.out.println(funcN(num));
    }




    public static int ret(int num){
        if(num < 10){
            System.out.println(num);
            return num;
        }else {
            ret(num / 10);
            return (num % 10);
        }
    }
    public static void main15(String[] args) {
        Scanner scan = new Scanner(System.in);
        int num = scan.nextInt();
        System.out.println(ret(num));
    }



    public static int func(int num){
        if(num == 0 || num == 1)
            return 1;
        else {
            return num * func(num - 1);
        }
    }
    public static void main14(String[] args) {
        Scanner scan = new Scanner(System.in);
        int num = scan.nextInt();
        System.out.println(func(num));
    }



    public static int addNum(int a, int b){
        return a + b;
    }

    public static double addNum(double d1 , double d2){
        return d1 + d2;
    }
    public static void main13(String[] args) {
        int a = 10;
        int b = 20;
        int ret = addNum(a,b);

        double d1 = 2.2;
        double d2 = 3.7;
        double ret2 = addNum(d1,d2);
    }



    public static void main12(String[] args) {
        Scanner scan = new Scanner(System.in);
        while (scan.hasNextInt()){
            int num1 = scan.nextInt();
            int num2 = scan.nextInt();
            System.out.println("交换前：num1 = " + num1 + "， num2 = " + num2);
            int tmp = num1;
            num1 = num2;
            num2 = tmp;
            System.out.println("交换后：num1 = " + num1 + "， num2 = " + num2);
        }
    }



    public static int fac(int n){
        int ret = 1;
        for (int i = 1; i <= n; i++) {
            ret *= i;
        }
        return  ret;
    }

    /*public static int facSum(int n){
        int sum = 0;
        for (int i = 1; i <= n; i++) {
            sum += fac(i);
        }
        return sum;
    }*/

    public static int facSum(int n){
        int sum = 0;
        for (int i = 1; i <= n; i++) {
            sum += fac(i - 1) * i;
        }
        return sum;
    }
    public static void main11(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        System.out.println(fac(n));
        System.out.println(facSum(n));
    }



    public static int add(int num1, int num2){
        return num1 + num2;
    }
    public static void main10(String[] args) {
        Scanner scan = new Scanner(System.in);
        int num1 = scan.nextInt();
        int num2 = scan.nextInt();
        int ret = add(num1, num2);
        System.out.println(ret);
    }



    public static boolean isLeapYear(int year){
        if((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)){
            return true;
        }else {
            return  false;
        }
    }
    public static void main9(String[] args) {
        Scanner scan = new Scanner(System.in);
        int num = scan.nextInt();
        boolean ret = isLeapYear(num);
        if (ret == true){
            System.out.println(num + "年是闰年");
        }else {
            System.out.println(num + "年不是闰年");
        }
    }



    public static void main8(String[] args) {
        Scanner scan = new Scanner(System.in);
        int num = scan.nextInt();//24
        int num2 = scan.nextInt();//18
        while (num % num2 != 0){   //6
            int tmp = num % num2; //tmp == 6
            num = num2;           //num =18 num2 = 6
            num2 = tmp;
        }
        System.out.println(num2);
    }



    public static void main7(String[] args) {
        Scanner scan = new Scanner(System.in);
        int num = scan.nextInt();
        for (int i = 0; i < 32; i += 2) {
            int ret = ((num >> i) & 1);
            System.out.print(ret + " ");
        }//倒叙打印奇数位
        System.out.println();
        for (int j = 30; j >= 0; j -= 2) {
            int ret2 = ((num >> j) & 1);
            System.out.print(ret2 + " ");
        }//正序打印奇数位
        System.out.println();
        for (int p = 1; p < 32 ; p += 2) {
            int ret3 = ((num >> p) & 1);
            System.out.print(ret3 + " ");
        }//倒叙打印偶数位
        System.out.println();
        for (int k = 31; k >= 1; k -= 2) {
            int ret4 = ((num >> k) & 1);
            System.out.print(ret4 + " ");
        }//正序打印偶数位
    }




    public static void main6(String[] args) {
        Scanner scan = new Scanner(System.in);
        int count = 3;
        while(count != 0){
            System.out.print("请输入密码：");
            String password = scan.nextLine();
            if(password.equals("123456")){
                System.out.println("密码输入正确，登录成功。");
                break;
            }else {
                count--;
                System.out.println("密码输入错误，你还有" + count + "次机会。");
            }
        }
    }



    public static void main5(String[] args) {
        Scanner scan = new Scanner(System.in);
        int count = 3;
        for (int i = 1; i <= 3 ; i++) {
            System.out.print("请输入密码：");
            String pass = scan.nextLine();
            if(pass.equals("123456")){
                System.out.println("密码输入正确，登录成功。");
                break;
            }else {
                count--;
                System.out.println("密码输入错误，请重新输入。你还有" + count + "次机会。");
            }
        }
    }



    public static void main4(String[] args) {
        Scanner scan = new Scanner(System.in);
        int num = scan.nextInt();
        while(num != 0){
            int ret = num % 10;
            num /= 10;
            System.out.print(ret + " ");
        }
    }



    public static void main3(String[] args) {
        Scanner scan = new Scanner(System.in);
        while (scan.hasNextInt()) {
            int num = scan.nextInt();
            for (int i = 1; i <= num; i++) {
                for (int j = 1; j <= num; j++) {
                    if(i == j || i + j == num + 1){
                        System.out.print("*");
                    }else {
                        System.out.print(" ");
                    }
                }
                System.out.println();
            }
        }
    }



    public static void main2(String[] args) {
        double sum = 0.0;
        int flag = 1;
        for (int i = 1; i <= 100 ; i++) {
            sum += 1.0 / i * flag;
            flag = - flag;
        }
        System.out.println(sum);
    }



    public static void main1(String[] args) {
        int count = 0;
        for (int i = 1; i <= 100; i++) {
            if (i / 10 == 9) {
                count++;
            }
            if (i % 10 == 9) {
                count++;
            }
        }
        System.out.println(count);
    }
}